﻿/*
 * @Description:楼盘管理页面js
 * @Author:yangpl
 * @Date:2014-08-19
 */
var FindEstatePagedByCondition = {};

//删除楼盘
FindEstatePagedByCondition.delEstate = function (ele) {
    //if (!confirm("您确定要删除当前楼盘吗？")) {
    //    return false;
    //}
    $.OKCancelDialogAgency("您确定要删除当前楼盘吗？", "删除楼盘", true, function () {
        var reqData = { "KeyId": $(ele).attr("keyid") };
        $.AjaxAgency("/estate/batch-remove-estate", reqData, function (data) {
            if (data == "ok") {
                $.dialog({
                    id: "dialogDelEstate",
                    title: "删除楼盘",
                    time: 1,
                    content: '<div class="tc">删除成功！</div>'
                });
                $("#searchForm").submit();
            } else {
                $.OKDialogAgency('<div class="tc">' + data + '</div>');
            }
        });
    });
};
